package com.burgeon.backend.SHOP.controller;


import com.burgeon.backend.SHOP.service.AppTemplateService;
import com.burgeon.backend.stsutil.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RequestMapping("shop/tem")
@RestController
public class AppTemplateController extends BaseController{
    @Autowired
    private AppTemplateService appTemplateService;

    @RequestMapping("expense") //消费模板
    public ResponseResult<Void> setPhone(String oid,HttpSession session){

        String token = session.getAttribute("token").toString();
        String uid = session.getAttribute("uid").toString();
        String openid = session.getAttribute("app_openid").toString();
        appTemplateService.SendExpense(oid,uid,openid,token);

        return new ResponseResult<>(SUCCESS);
    }
}
